<template>
  <div class="my-menu-top clearfix">
    <el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect" class="top-menu">
      <el-menu-item index="1">运营平台</el-menu-item>
      <el-menu-item index="2">权限平台</el-menu-item>
    </el-menu>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  computed: {
    ...mapGetters([
    ])
  },
  data() {
    return {
      activeIndex: '1'
    }
  },
  created: function(params) {
  },
  methods: {
    handleSelect(key, keyPath) {
      // 设置当前选中的头部导航
      this.$store.dispatch('SetSidebarTopActive', key).then(() => {
      }).catch(() => {
      })
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.my-menu-top{
  padding-right: 200px;
  border-bottom: solid 1px #e6e6e6;
  .top-menu{
    width: 100%;
    float: left;
  }
  .el-menu.el-menu--horizontal{
    border-bottom: none;
  }
}
</style>
